radio-menu-item: Handle a !NULL group
authorEmmanuele Bassi <ebassi@linux.intel.com>
Mon, 5 Mar 2012 13:09:47 +0000 (13:09 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 22 Mar 2015 06:10:37 +0000 (02:10 -0400)
If we create a RadioMenuItem without a group, and then set a group, the
menu item will still be set as active, which means an inconsistently
drawn radio menu item - as the RadioMenuItem will set the active flag on
itself, but then it won't reset it when it gets a new group.

https://bugzilla.gnome.org/show_bug.cgi?id=671362

gtk/gtkradiomenuitem.c

index 8eaab3b4c549eead47c3095b92dd8df976c642bf..ee49423325dc8efd4b153aaef5978186b1dac77d 100644 (file)
@@ -208,6 +208,8 @@ gtk_radio_menu_item_set_group (GtkRadioMenuItem *radio_menu_item,
 
          tmp_item->priv->group = priv->group;
        }
+
+      _gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (radio_menu_item), FALSE);
     }
   else
     {